//
//  NSChatPhotoBrowser.m
//  Meboo
//
//  Created by kyo on 2024/4/24.
//

#import "NSChatPhotoBrowser.h"
#import "GXPHKitTool.h"
@interface NSChatPhotoBrowser ()
@property (nonatomic, strong) UIView *secView;
@property (nonatomic, strong) NSData *data;
@end

@implementation NSChatPhotoBrowser

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self creatSubViews];
}

#pragma mark - Send Private Action

#pragma mark - Public Metohd

- (void)setVideoLength:(NSInteger)videoLength {
    _videoLength = videoLength;
}

- (UIView *)getBgView{
    UITextField *bgTextField = [[UITextField alloc] init];
    [bgTextField setSecureTextEntry:true];
    
    UIView *bgView = bgTextField.subviews.firstObject;
    [bgView setUserInteractionEnabled:true];
    bgView.backgroundColor = UIColor.clearColor;
    return bgView;
}
#pragma mark - Action




#pragma mark - UI
- (void)creatSubViews {
    for (UIView *view in self.view.subviews) {
        CGRect frame = view.frame;
        [view removeFromSuperview];
        [self.secView addSubview:view];
        view.frame = frame;
    }
    
    [self.view addSubview:self.secView];
    [self.view sendSubviewToBack:self.secView];
    [self.secView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

#pragma mark - Setter && Getter

- (NSData *)data {
    if (!_data) {
        _data = [NSData data];
    }
    return _data;
}

- (UIView *)secView {
    if (!_secView) {
        _secView = [self getBgView];
    }
    return _secView;
}
@end
